package net.qhzw.vip.qiyu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import net.qhzw.vip.qiyu.entity.RepairCode;
import net.qhzw.vip.qiyu.model.RepairCodeVo;

public interface RepairCodeService extends IService<RepairCode> {

    /***
     * 分页查询电动车
     * @param page
     * @return
     */
    PageInfo<RepairCodeVo> findByPage(Page<RepairCode> page, String vehicleNumber, Byte vehicleStatus, Long shopId);


    boolean addRepairCode(RepairCode repairCode);

    boolean updateRepairCode(RepairCode repairCode);


    int updateByPrimaryKeySelective(RepairCode repairCodeBef);

    /***
     * 根据当前登录用户分页查询电动车
     * @param page
     * @param userId
     * @return
     */
    Page<RepairCode> findPageByUser(Page<RepairCode> page, Long userId, String vehicleNumber, Long shopId);

    /**
     * 修改车辆信息
     * @param repairCodeBef
     */
    void updateByUser(RepairCode repairCodeBef);

    boolean updateVehicleStatus(RepairCode repairCodeBef);

    int closeRepairCode(Long id);


}
